﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using RStein.Posterous.API;
using RStein.PosterousReader.WP.ViewModels;
using RStein.PosterousReader.WP.HostServices;
using RStein.PosterousReader.WP.UI;
using RStein.PosterousReader.WP.Behaviors;

namespace RStein.PosterousReader.WP.Views
{
    public partial class PostDetailView : PageBase

    {
        // Constructor
        public PostDetailView()
        {
            InitializeComponent();            
            
        }

        
        private void Edit_Click(object sender, EventArgs e)
        {
          handleEditPost();

        }

        private void handleEditPost()
        {
          PostDetailViewModel viewModel = getViewModel();
          viewModel.EditPostCommand.Execute(null);
        }

        private PostDetailViewModel getViewModel()
        {
          return DataContext as PostDetailViewModel;
        }
       
    }
}